package com.aspose.cells;

import java.util.Iterator;

class zbgf extends zck {
   zbgf(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
   }

   private com.aspose.cells.b.a.b.a.ze[] d(com.aspose.cells.b.a.b.zq var1) {
      com.aspose.cells.b.a.b.a.ze var2 = new com.aspose.cells.b.a.b.a.ze();
      if (this.e.b() == null) {
         return null;
      } else {
         zacd var3 = this.e.b();
         int var4 = var3.a().size();
         com.aspose.cells.b.a.b.a.ze[] var5 = new com.aspose.cells.b.a.b.a.ze[var4];
         boolean var6 = false;
         boolean var7 = false;
         float var8 = 0.0F;
         float var9 = 0.0F;
         float var10 = 0.0F;
         float var11 = 0.0F;
         float var12 = 0.0F;
         float var13 = 0.0F;
         float var14 = 0.0F;
         float var15 = 0.0F;
         int var16 = (int)var1.f();
         int var17 = (int)var1.g();
         int var18 = (int)var1.h();
         int var19 = (int)var1.i();

         for(int var20 = 0; var20 < var4; ++var20) {
            int var24 = (int)((zacb)var3.a().get(var20)).c();
            int var25 = (int)((zacb)var3.a().get(var20)).b();
            if (var24 <= 0) {
               ++var24;
            }

            if (var25 <= 0) {
               ++var25;
            }

            Iterator var21 = ((zacb)var3.a().get(var20)).a().iterator();

            while(var21.hasNext()) {
               zanw var22 = (zanw)var21.next();
               com.aspose.cells.b.a.b.zn[] var23 = new com.aspose.cells.b.a.b.zn[4];
               if (var22.b().size() == 0) {
                  ;
               }

               if (var22.b().size() == 1) {
                  var23[0] = (com.aspose.cells.b.a.b.zn)var22.b().get(0);
               } else if (var22.b().size() == 2) {
                  var23[0] = (com.aspose.cells.b.a.b.zn)var22.b().get(0);
                  var23[1] = (com.aspose.cells.b.a.b.zn)var22.b().get(1);
               } else if (var22.b().size() == 3) {
                  var23[0] = (com.aspose.cells.b.a.b.zn)var22.b().get(0);
                  var23[1] = (com.aspose.cells.b.a.b.zn)var22.b().get(1);
                  var23[2] = (com.aspose.cells.b.a.b.zn)var22.b().get(2);
               } else if (var22.b().size() == 4) {
                  var23[0] = (com.aspose.cells.b.a.b.zn)var22.b().get(0);
                  var23[1] = (com.aspose.cells.b.a.b.zn)var22.b().get(1);
                  var23[2] = (com.aspose.cells.b.a.b.zn)var22.b().get(2);
                  var23[3] = (com.aspose.cells.b.a.b.zn)var22.b().get(3);
               }

               switch(var22.a()) {
               case 0:
                  var10 = (float)var23[1].a() / (float)var24 * (float)var18 + (float)var16;
                  var11 = (float)var23[1].b() / (float)var25 * (float)var19 + (float)var17;
                  var2.b(var8, var9, var10, var11);
                  var8 = var10;
                  var9 = var11;
                  break;
               case 1:
                  var10 = (float)var23[1].a() / (float)var24 * (float)var18 + (float)var16;
                  var11 = (float)var23[1].b() / (float)var25 * (float)var19 + (float)var17;
                  var12 = (float)var23[2].a() / (float)var24 * (float)var18 + (float)var16;
                  var13 = (float)var23[2].b() / (float)var25 * (float)var19 + (float)var17;
                  var14 = (float)var23[3].a() / (float)var24 * (float)var18 + (float)var16;
                  var15 = (float)var23[3].b() / (float)var25 * (float)var19 + (float)var17;
                  var2.a(var8, var9, var10, var11, var12, var13, var14, var15);
                  var8 = var14;
                  var9 = var15;
                  break;
               case 2:
                  var2.j();
                  var8 = (float)var23[0].a() / (float)var24 * (float)var18 + (float)var16;
                  var9 = (float)var23[0].b() / (float)var25 * (float)var19 + (float)var17;
                  break;
               case 3:
                  var2.i();
               case 4:
               default:
                  break;
               case 5:
                  var8 = (float)var16;
                  var9 = (float)var17;
                  var10 = (float)var23[1].a() / (float)var24 * (float)var18 + (float)var16;
                  var11 = (float)var23[1].b() / (float)var25 * (float)var19 + (float)var17;
                  var12 = (float)var23[2].a() / (float)var24 * (float)var18 + (float)var16;
                  var13 = (float)var23[2].b() / (float)var25 * (float)var19 + (float)var17;
                  var2.a(var8, var9, var10 * 2.0F, var11 * 2.0F, var12, var13);
               }
            }

            var5[var20] = var2;
         }

         return var5;
      }
   }

   void b() {
      float var1 = this.e.v().f();
      float var2 = this.e.v().g();
      float var3 = this.e.v().h();
      float var4 = this.e.v().i();
      com.aspose.cells.b.a.b.zq var5 = new com.aspose.cells.b.a.b.zq(var1, var2, var3, var4);
      com.aspose.cells.b.a.b.a.zf var6 = this.a.e();
      this.a.a(4);
      com.aspose.cells.b.a.b.a.ze var7 = new com.aspose.cells.b.a.b.a.ze();
      var7.b(var5);
      com.aspose.cells.b.a.b.zc var8 = zbum.a(this.e.w(), var7);
      com.aspose.cells.b.a.b.zm var9 = zbum.a(this.e.x());
      Object var10 = null;
      com.aspose.cells.b.a.b.a.ze[] var11 = this.d(var5);
      if (var11 != null) {
         int var12 = var11.length;
         if (var12 != 0) {
            for(int var13 = 0; var13 < var12; ++var13) {
               if (!this.e.w().a()) {
                  this.a.a(var8, var11[var13]);
               }

               if (!this.e.x().a()) {
                  this.a.a(var9, var11[var13]);
               }
            }

            super.a();
            this.a.a(var6);
         }
      }
   }
}
